package deep.projects.newsapp.activities;

import android.content.Intent;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;

import butterknife.OnClick;
import deep.projects.newsapp.R;

/**
 * @author 吾心无待 于2016年03月05日
 */
public class AboutActivity extends BaseLayoutActivity {
    @Override
    public int getLayoutId() {
        return R.layout.activity_about;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        tvTitle.setText(R.string.title_activity_about);
    }

    //拨打客服电话
    @OnClick(R.id.ll_phone)void onCallPhone(View v){
        PackageManager pm = getPackageManager();
        if(pm.checkPermission("android.permission.CALL_PHONE","packageName") == PackageManager.PERMISSION_GRANTED)return;
        startActivity(new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + ((EditText) v).getText())));
    }
}
